<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
	<script language='JavaScript'>
		function SomenteNumero(e){
		    var tecla=(window.event)?event.keyCode:e.which;   
		    
		    if((tecla>47 && tecla<58 || tecla == 46)) return true;
		    else{
		    	if (tecla==8 || tecla==0) return true;
			else  return false;
		    }
		}
	</script>

</head>
<body>
	
	<form action="ServletIMC" method="post">
		<table align="center">
			<tr>
				<td colspan="2">
					<h1>Teste de IMC</h1>
				</td>
			</tr>
			<tr>
				<td>
					<label for="peso">Peso:</label>
				</td>
				<td>
					<input type="text" name="peso" id="peso" onkeypress='return SomenteNumero(event)'>
				</td>
			</tr>
			<tr>
				<td>
					<label for="altura">Altura:</label>
				</td>
				<td>
					<input type="text" name="altura" id="altura" onkeypress='return SomenteNumero(event)'>
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<input type="submit" value="Calcular">
				</td>
			</tr>
			
				
		</table>
	</form>

</body>
</html>